package com.lhx.tree.bilibili;

import com.lhx.tree.TreeNode;

public class tree_houxu {
    public static void houorder(TreeNode root) {
        if(root == null) {
            return;
        }
        houorder(root.left);
        houorder(root.right);
        System.out.println(root.val);
    }

    public static void main(String[] args) {
        TreeNode node7 = new TreeNode(7,null,null);
        TreeNode node6 = new TreeNode(6,null,null);
        TreeNode node5 = new TreeNode(5,node6,node7);
        TreeNode node4 = new TreeNode(4,null,null);
        TreeNode node3 = new TreeNode(3,null,null);
        TreeNode node2 = new TreeNode(2,node4,node5);
        TreeNode node1 = new TreeNode(1,node2,node3);
        houorder(node1);
    }
}
